//------------------------------------------------------------------------------
// File: Streams.h
//
// Desc: DirectShow base classes - defines overall streams architecture.
//
// Copyright (c) 1992 - 2000, Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------


#ifndef __STREAMS__
#define __STREAMS__

#ifdef	_MSC_VER
// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed"


#if _MSC_VER>=1100
#define AM_NOVTABLE //__declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#endif	// MSC_VER

#define AM_NOVTABLE

//#include <windows.h>
//#include <windowsx.h>
//#include <olectl.h>
//#include <ddraw.h>
//#include <mmsystem.h>

#include "../JWTS/INCLUDE/LEGACYREPLACER.HPP"

#ifndef NUMELMS
   #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
#endif

///////////////////////////////////////////////////////////////////////////
// The following definitions come from the Platform SDK and are required if
// the applicaiton is being compiled with the headers from Visual C++ 6.0.
///////////////////////////////////////////////////////////////////////////
#ifndef InterlockedExchangePointer
	#define InterlockedExchangePointer(Target, Value) \
   (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
#endif

#ifndef _WAVEFORMATEXTENSIBLE_
#define _WAVEFORMATEXTENSIBLE_
typedef struct {
    WAVEFORMATEX    Format;
    union {
        WORD wValidBitsPerSample;       /* bits of precision  */
        WORD wSamplesPerBlock;          /* valid if wBitsPerSample==0 */
        WORD wReserved;                 /* If neither applies, set to zero. */
    } Samples;
    DWORD           dwChannelMask;      /* which channels are */
                                        /* present in stream  */
    GUID            SubFormat;
} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
#endif // !_WAVEFORMATEXTENSIBLE_

#if !defined(WAVE_FORMAT_EXTENSIBLE)
#define  WAVE_FORMAT_EXTENSIBLE                 0xFFFE
#endif // !defined(WAVE_FORMAT_EXTENSIBLE)
/*
#ifndef GetWindowLongPtr
  #define GetWindowLongPtrA   GetWindowLongA
  #define GetWindowLongPtrW   GetWindowLongW
  #ifdef UNICODE
    #define GetWindowLongPtr  GetWindowLongPtrW
  #else
    #define GetWindowLongPtr  GetWindowLongPtrA
  #endif // !UNICODE
#endif // !GetWindowLongPtr

#ifndef SetWindowLongPtr
  #define SetWindowLongPtrA   SetWindowLongA
  #define SetWindowLongPtrW   SetWindowLongW
  #ifdef UNICODE
    #define SetWindowLongPtr  SetWindowLongPtrW
  #else
    #define SetWindowLongPtr  SetWindowLongPtrA
  #endif // !UNICODE
#endif // !SetWindowLongPtr
*/
#ifndef GWLP_WNDPROC
  #define GWLP_WNDPROC        (-4)
#endif
#ifndef GWLP_HINSTANCE
  #define GWLP_HINSTANCE      (-6)
#endif
#ifndef GWLP_HWNDPARENT
  #define GWLP_HWNDPARENT     (-8)
#endif
#ifndef GWLP_USERDATA
  #define GWLP_USERDATA       (-21)
#endif
#ifndef GWLP_ID
  #define GWLP_ID             (-12)
#endif
#ifndef DWLP_MSGRESULT
  #define DWLP_MSGRESULT  0
#endif
#ifndef DWLP_DLGPROC 
  #define DWLP_DLGPROC    DWLP_MSGRESULT + sizeof(LRESULT)
#endif
#ifndef DWLP_USER
  #define DWLP_USER       DWLP_DLGPROC + sizeof(DLGPROC)
#endif
///////////////////////////////////////////////////////////////////////////
// End Platform SDK definitions
///////////////////////////////////////////////////////////////////////////


//#include <strmif.h>     // Generated IDL header file for streams interfaces

#include <REFTIME.H>    // Helper class for REFERENCE_TIME management
#include <WXDEBUG.H>    // Debug support for logging and ASSERTs
//#include <amvideo.h>    // ActiveMovie video interfaces and definitions
//include amaudio.h explicitly if you need it.  it requires the DX SDK.
//#include <amaudio.h>    // ActiveMovie audio interfaces and definitions
#include <WXUTIL.H>     // General helper classes for threads etc
#include <combase.h>    // Base COM classes to support IUnknown
#include <DLLSETUP.H>   // Filter registration support functions
#include <MEASURE.H>    // Performance measurement
//#include <comlite.h>    // Light weight com function prototypes

#include <CACHE.H>      // Simple cache container class
#include <WXLIST.H>     // Non MFC generic list class
#include <MSGTHRD.H>	// CMsgThread
#include <MTYPE.H>      // Helper class for managing media types
#include <FOURCC.H>     // conversions between FOURCCs and GUIDs
//#include <control.h>    // generated from control.odl
#include <ctlutil.h>    // control interface utility classes
//#include <evcode.h>     // event code definitions
#include <Amfilter.h>   // Main streams architecture class hierachy
#include <TRANSFRM.H>   // Generic transform filter
#include <TRANSIP.H>    // Generic transform-in-place filter
//#include <uuids.h>      // declaration of type GUIDs and well-known clsids
#include <SOURCE.H>     // Generic source filter
#include <OUTPUTQ.H>    // Output pin queueing
//#include <errors.h>     // HRESULT status and error definitions
#include <RENBASE.H>    // Base class for writing ActiveX renderers
#include <Winutil.h>    // Helps with filters that manage windows
#include <WINCTRL.H>    // Implements the IVideoWindow interface
#include <VIDEOCTL.H>   // Specifically video related classes
#include <REFCLOCK.H>	// Base clock class
#include <SYSCLOCK.H>	// System clock
#include <PSTREAM.H>    // IPersistStream helper class
#include <VTRANS.H>     // Video Transform Filter base class
#include <AMEXTRA.H>
#include <CPROP.H>      // Base property page class
#include <STRMCTL.H>    // IAMStreamControl support
//#include <edevdefs.h>   // External device control interface defines
//#include <audevcod.h>   // audio filter device error event codes

#else
    #ifdef DEBUG
    #pragma message("STREAMS.H included TWICE")
    #endif
#endif // __STREAMS__
